import {
  AutoIncrement,
  Column,
  DataType,
  Model,
  PrimaryKey,
  Table,
} from 'sequelize-typescript';

@Table({
  tableName: 'vip_types',
})
export class VipTypes extends Model {
  @PrimaryKey
  @AutoIncrement
  @Column({
    type: DataType.INTEGER,
    allowNull: false,
    comment: 'id',
  })
  id: number;

  @Column({
    type: DataType.INTEGER,
    comment:
      '类型(1:包天vip 2: 7天vip 3:包月vip 4: 包年vip 5: 终身vip 6: 3次下载包)',
  })
  type: number;

  //用户名称
  @Column({
    type: DataType.STRING(255),
    comment: 'name',
  })
  name: string;

  //用户名称
  @Column({
    type: DataType.INTEGER,
    comment: '状态',
  })
  status: number;

  @Column({
    type: DataType.INTEGER,
    comment: '次数限制',
  })
  limitTimes: number;

  @Column({
    type: DataType.INTEGER,
    comment: '',
  })
  durationDays: number;

  @Column({
    type: DataType.DECIMAL(6, 2),
    comment: '价格',
  })
  price: number;

  @Column({
    type: DataType.STRING(255),
    comment: '来源',
  })
  description: string;
}
